package prototypeDemo.exp1;

import java.util.HashMap;

/**
 * @author zsh
 * @Description
 * @create 2022-05-16 19:23
 */
public class Manager {
    private HashMap<String, Product> showcase = new HashMap<>();

    public void register(String name, Product product){
        showcase.put(name,product);
    }

    public Product create(String protoName){
        Product p = showcase.get(protoName);
        return p.createClone();
    }
}
